package com.rwhansen.humidor;

import javax.swing.JFrame;
import java.awt.BorderLayout;
import javax.swing.JPanel;
import javax.swing.JLabel;
import javax.swing.SwingConstants;
import java.awt.Font;
import java.awt.Toolkit;

public class About {
	
	public static Database cigarDatabase;
	public static Database humidorDatabase;
	public static Database ratingsDatabase;

	JFrame frmStats;

	public About(String updated, String version) {
		frmStats = new JFrame();
		frmStats.setIconImage(Toolkit.getDefaultToolkit().getImage(About.class.getResource("/com/rwhansen/humidor/favicon.ico")));
		frmStats.setFont(new Font("GodOfWar", Font.PLAIN, 12));
		frmStats.setTitle("About");
		frmStats.setAlwaysOnTop(true);
		frmStats.setBounds(100, 100, 387, 173);
		frmStats.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
		
		JPanel panel = new JPanel();
		frmStats.getContentPane().add(panel, BorderLayout.CENTER);
		panel.setLayout(null);
		
		JLabel lblCreatedByRobert = new JLabel("Created by Robert Hansen");
		lblCreatedByRobert.setFont(new Font("GodOfWar", Font.PLAIN, 13));
		lblCreatedByRobert.setHorizontalAlignment(SwingConstants.CENTER);
		lblCreatedByRobert.setBounds(18, 12, 363, 16);
		panel.add(lblCreatedByRobert);
		
		JLabel lblCreated = new JLabel("Created: 09/25/2011");
		lblCreated.setFont(new Font("GodOfWar", Font.PLAIN, 13));
		lblCreated.setHorizontalAlignment(SwingConstants.CENTER);
		lblCreated.setBounds(18, 68, 363, 16);
		panel.add(lblCreated);
		
		JLabel lblLastUpdat = new JLabel("Last Update: " + updated);
		lblLastUpdat.setFont(new Font("GodOfWar", Font.PLAIN, 13));
		lblLastUpdat.setHorizontalAlignment(SwingConstants.CENTER);
		lblLastUpdat.setBounds(18, 122, 363, 16);
		panel.add(lblLastUpdat);
		
		JLabel lblCurentVersion = new JLabel("Curent Version: " + version);
		lblCurentVersion.setFont(new Font("GodOfWar", Font.PLAIN, 13));
		lblCurentVersion.setHorizontalAlignment(SwingConstants.CENTER);
		lblCurentVersion.setBounds(18, 96, 363, 14);
		panel.add(lblCurentVersion);
		
		JLabel lblWritenByRobert = new JLabel("Writen by Robert Hansen and Vesper Williams");
		lblWritenByRobert.setHorizontalAlignment(SwingConstants.CENTER);
		lblWritenByRobert.setFont(new Font("GodOfWar", Font.PLAIN, 13));
		lblWritenByRobert.setBounds(18, 40, 363, 16);
		panel.add(lblWritenByRobert);
		
	}
}
